<extend name="Public:base"/>
<a href="{:U}">返回</a>
<block name="content">
    <form action="{:U('InterestRate/change')}" method="post" id="formData"  enctype="multipart/form-data">
        <input type="hidden" name="id" value="{$detail['id']}">
        <table style="width: 250px" class="table table-striped table-bordered table-hover">
            <tr>
                <td>维修保证金利率</td>
                <td>{$detail.rate}%</td>
            </tr>
            <tr>
                <td><label><input type="radio" name="status" value="1" {$detail['status']==1?'checked':''}>启用</label></td>
                <td><label><input type="radio" name="status" value="0" {$detail['status']==0?'checked':''}>暂停</label></td>
            </tr>
            <tr>
                <td colspan="2"><input class="btn btn-primary btn-sm radius5" id="my" onclick="change()" type="button" value="提交"></td>
            </tr>
        </table>
    </form>

</block>
<block name="javascript">
    <script type="text/javascript">
       function change(){
           $('#formData').ajaxSubmit(function(data){
                   $.jbox.tip("修改成功...", 'loading');
                   // 模拟2秒后完成操作
                   window.setTimeout(function () { $.jbox.tip('修改成功。', 'success');location.reload()}, 1000);
           });
           return false
       }
    </script>
</block>

